@layout("/common/_container.html"){
<div>
     <div class="form-horizontal" style='overflow:scroll;'>
            <div>
            <div>
            	<input id="id" type="hidden"  name="id" value="${item.collectBasicInformation.id}">
            		<table border="1" cellpadding="4px" width="1000px">
            			<tr>
							<td>基本信息：</td>
							<td colspan="7"></td>
						</tr>
            			<tr>
							<td>收款单号:</td>
							<td>${item.collectBasicInformation.collectId}</td>
							<td>收款日期:</td>
							<td>${tool.dateType(item.collectBasicInformation.collectDate)}</td>
							<td>制单:</td>
							<td>${item.collectBasicInformation.collectTradePerson}</td>
							<td>审核:</td>
							<td>${item.collectBasicInformation.collectCheck}</td>
						</tr>
            			<tr>
							<td>车号:</td>
							<td>${item.collectBasicInformation.collectCarId}</td>
							<td>驾驶员：</td>
							<td>${item.collectBasicInformation.collectCarDriver}</td>
							<td>联系电话：</td>
							<td>${item.collectBasicInformation.collectCarDriverTell}</td>
							<td>手机：</td>
							<td>${item.collectBasicInformation.collectCarDriverMobile}</td>
						</tr>
						<tr>
							<td>车次:</td>
							<td>${item.collectBasicInformation.collectCarNumber}</td>
							<td>物流线路:</td>
							<td>${item.collectBasicInformation.collectRouteId}</td>
							<td>始发站：</td>
							<td>${item.collectBasicInformation.collectRouteStart}</td>
							<td>到站：</td>
							<td>${item.collectBasicInformation.collectRouteEnd}</td>
						</tr>
            			<tr>
							<td>运费:</td>
							<td>${item.collectBasicInformation.collectSumGoodsFreight}</td>
							<td>信息费:</td>
							<td>${item.collectBasicInformation.collectSumGoodsMessagefee}</td>
							<td>提货费：</td>
							<td>${item.collectBasicInformation.collectSumGoodsPickupCharge}</td>
							<td>中转站：</td>
							<td>${item.collectBasicInformation.collectRouteTransferStation}</td>
						</tr>
            			<tr>
							<td>总费用:</td>
							<td>${item.collectBasicInformation.collectSumFee}</td>
							<td>本次收款:</td>
							<td>${item.collectBasicInformation.collectThisMoney}</td>
							<td>收款余额：</td>
							<td>${item.collectBasicInformation.collectUncollectMoney}</td>
							<td>收款方式：</td>
							<td>${item.collectBasicInformation.collectType}</td>
						</tr>
						<tr>
							<td>备注</td>
							<td colspan="7">${item.collectBasicInformation.collectRemark}</td>
						</tr>
            		</table>
            	</div>
            	<br>
            	<div style='width:2550px;'>
            			<table border="1" cellpadding="4px" width="2500px" class="table1">
            				<tr>
								<td colspan="21">装车信息：</td>
							</tr>
							<tr>
								<td width="120px">装车单号</td>
								<td width="120px">合同号</td>
								<td width="70px">发货人</td>
								<td width="100px">发货人电话</td>
								<td width="250px">发货人地址</td>
								<td width="70px">收货人</td>
								<td width="100px">收货人电话</td>
								<td width="250px">收货人地址</td>
								<td width="145px">货物编号</td>
								<td width="250px">货物名称</td>
								<td width="250px">货物规格</td>
								<td width="100px">包装方式</td>
								<td width="115px">发货数量</td>
								<td width="90px">重量(KG)</td>
								<td width="90px">体积(m³)</td>
								<td width="70px">运费</td>
								<td width="70px">信息费</td>
								<td width="70px">提货费</td>
								<td width="120px">仓库</td>
								<td width="130px">备注</td>
							</tr>
							 @for(collectCarryInformation   in   item.collectCarryInformations){ 
						<tr class='logo'>
							<td>${collectCarryInformation.collectCarryId}</td>
							<td>${collectCarryInformation.collectContractNumber}</td>
							<td>${collectCarryInformation.collectConsignerName}</td>
							<td>${collectCarryInformation.collectConsignerTell}</td>
							<td>${collectCarryInformation.collectConsignerPlace}</td>
							<td>${collectCarryInformation.collectConsigneeName}</td>
							<td>${collectCarryInformation.collectConsigneeTell}</td>
							<td>${collectCarryInformation.collectConsigneePlace}</td>
							<td>${collectCarryInformation.collectGoodsId}</td>
							<td>${collectCarryInformation.collectGoodsName}</td>
							<td>${collectCarryInformation.collectGoodsModel}</td>
							<td>${collectCarryInformation.collectGoodsPackage}</td>
							<td class="collectThisQuantity">${collectCarryInformation.collectThisQuantity}</td>
							<td class="collectGoodsWeight">${collectCarryInformation.collectGoodsWeight}</td>
							<td class="collectGoodsVolume">${collectCarryInformation.collectGoodsVolume}</td>
							<td class="collectGoodsFreight">${collectCarryInformation.collectGoodsFreight}</td>
							<td class="collectGoodsMessagefee">${collectCarryInformation.collectGoodsMessagefee}</td>
							<td class="collectGoodsPickupCharge">${collectCarryInformation.collectGoodsPickupCharge}</td>
							<td class="">${collectCarryInformation.collectGoodsWarehouseName}</td>
							<td class="">${collectCarryInformation.collectGoodsRemark}</td>
						</tr>
					@}
            				<tr id="sumCopy">
								<td colspan="12">总计</td>
								<td id="carryCount"></td>
								<td id="sumWeight"></td>
								<td id="sumVolume"></td>
								<td id="sumFreight"></td>
								<td id="sumMessagefee"></td>
								<td id="sumPickupCharge"></td>
								<td colspan="2"></td>
							</tr>
            			</table>
            	</div>
            	</div>
            <div class="row btn-group-m-t">
             	<div class="col-sm-5">
                </div>
                 @if(shiro.hasPermission("/collectBasicInformation/print")){
                <div class="col-sm-2">
                                <#button name="收款信息打印" btnCss="info" icon="fa-check" clickFun="preview()"/>
                </div>
                            @}
                 @if(shiro.hasPermission("/collectBasicInformation/anti")){
               			 <div id="anti" class="col-sm-1">
                                <#button name="反审核" btnCss="info" icon="fa-check" clickFun="CollectBasicInformationInfoDlg.editSubmit()"/>
               			 </div>
                            @}
                <div class="col-sm-1">
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CollectBasicInformationInfoDlg.close()"/>
                </div>
               <div class="col-sm-3">
                </div>
            </div>
        </div>

    </div>
</div>
<script src="${ctxPath}/static/modular/query/collectBasicInformation/collectBasicInformation_info.js"></script>
<script>
	//初始化运费、信息费、提货费
function initCount(){
	//初始化发货数量
	var a = 0;
	$(".collectThisQuantity").each(function(){
		var count ;
		count=Number($(this).text());
        	a += count;
	});
	$("#carryCount").text(a);
	
	//初始化重量
	var b = 0;
	$(".collectGoodsWeight").each(function(){
		var count ;
		count=Number($(this).text());
        	b += count;
	});
	$("#sumWeight").text(b);
	//初始化体积
	var c = 0;
	$(".collectGoodsVolume").each(function(){
		var count ;
		count=Number($(this).text());
        	c += count;
	});
	$("#sumVolume").text(c);
	//初始化运费
	var d = 0;
	$(".collectGoodsFreight").each(function(){
		var count ;
		count=Number($(this).text());
        	d += count;
	});
	$("#sumFreight").text(d);
	//信息费
	var e = 0;
	$(".collectGoodsMessagefee").each(function(){
		var count ;
		count=Number($(this).text());
        	e += count;
	});
	$("#sumMessagefee").text(e);
	//提货费
	var f = 0;
	$(".collectGoodsPickupCharge").each(function(){
		var count ;
		count=Number($(this).text());
        	f += count;
	});
	$("#sumPickupCharge").text(f);
}
$(function(){
	initCount();
});
</script>
@}
